package com.leyou.entity;

import lombok.Data;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

@Data
@Table(name = "tb_spu")
public class Spu {
    @Id
    @KeySql(useGeneratedKeys = true)
    private Long id; //NOT NULL AUTO_INCREMENT COMMENT 'spu id
    private String title; //NOT NULL DEFAULT '' COMMENT '标题
    private String subTitle; // DEFAULT '' 子标题
    private Long cid1; //NOT NULL COMMENT 1级类目id
    private Long cid2; //NOT NULL COMMENT 2级类目id
    private Long cid3; //NOT NULL COMMENT 3级类目id
    private Long brandId; //NOT NULL COMMENT 商品所属品牌id
    private Boolean saleable; //NOT NULL DEFAULT '1' COMMENT '是否上架，0下架，1上架
    private Boolean valid; //NOT NULL DEFAULT '1' COMMENT '是否有效，0已删除，1有效
    private Date createTime; //添加时间
    private Date lastUpdateTime; //最后修改时间

}
